package designPattern.singleton;

/**
 * Author: hu
 * Date: 2021/11/26 09:47
 * 单例模式——恶汉模式
 */
public class Singleton1 {
    private static final Singleton1 instanse=new Singleton1();
    private Singleton1(){}

    //线程安全
    public static Singleton1 getInstance(){
        return instanse;
    }

}
